I'm using some custom export to excel stuff, and when I paste object text that has tabs and linefeeds in it, my export gets screwy. Here's a code snippet:
currMod = current Module
Object othero
Buffer tempO = create
for othero in entire currMod do
{
string oi = identifier othero ""
string ot = othero."Object Text" ""
tempO += oi "\t" ot
tempO += "\n"
}
OleAutoObj wbs
OleAutoObj wb
OleAutoObj ws
OleAutoObj objCell
OleAutoArgs args = create
OleAutoObj objFont
void openExcel()
{
OleAutoObj ex = oleCreateAutoObject "Excel.Application"
oleGet (ex, "Workbooks", wbs)
oleMethod (wbs, "Add", args, wb)
olePut(ex, "Visible", true)
put(args, 1)
oleGet (ex, "Worksheets", args, ws)
}
void pasteString (int y, int x, string s)
{
clear args
put (args, y)
put (args, x)
oleGet (ws, "Cells", args, objCell)
clear args
put (args, objCell)
copyToClipboard s
print oleMethod (ws, "Paste",args)
}
openExcel()
pasteString (1,1, tempStringOf tempO)
delete tempO
}
moheganburnerIII - Fri Oct 14 17:03:02 EDT 2011 |
Re: Tabs Gone Wild https://www.ibm.com/developerworks/forums/thread.jspa?messageID=14627116� Hope this helps, regards, Mathias Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: Tabs Gone Wild |